package clientdcsinstance.server.accessers.impl;

import clientdcsinstance.server.accessers.DataWriterOperations;
import clientdcsinstance.server.interfaces.impl.PublisherImpl;
import clientdcsinstance.server.operations.Operation;

public class DataWriterImpl implements DataWriterOperations{
	private PublisherImpl publisher;
	/**
	 * constructeur
	 * @param publisher
	 */
	public DataWriterImpl(PublisherImpl publisher) {
		this.publisher = publisher;
		((Thread)publisher).start();
	}
	
	@Override
	public boolean write(String topicName, Operation operation) {
		return publisher.addData(topicName, operation);
	}
	
}
